<template>
  <div class="event1">
    <h3>我是event2组件</h3>
    <el-button @click="changeBrother">点我改变兄弟组件的值</el-button>
  </div>
</template>

<script setup lang="ts">
import mittBus from "@/utils/mittBus";
/**
 * 兄弟组件之间的通信
 */
const changeBrother = () => {
  mittBus.emit("emit-brother", [1, 2, 3, 4]);
};
</script>

<style scoped lang="scss">
.event1 {
  height: 200px;
  width: 400px;
  background: blue;
}
</style>
